<template>
  <div id="app">
    <!-- <van-button type="primary" @click="login">登录</van-button>
    <van-button type="info" @click="register">注册</van-button> -->
    <router-view></router-view>
  </div>
</template>

<script>
import request from '@/utils/request';
export default {
  data () {
    return {};
  },
  methods: {
    async register () {
      try {
        const res = await request({
          url: '/user/register',
          method: 'post',
          data: {
            username: '12day',
            password: '123456'
          }
        })
        console.log(res);
      } catch (err) {
        console.log(err);
      }
    },
    async login () {
      try {
        const res = await request({
          url: '/user/login',
          method: 'post',
          data: {
            username: '12day',
            password: '123456'
          }
        })
        console.log(res);
      } catch (err) {
        console.log(err);
      }
    }
  }
}
</script>

<style  scoped>

</style>
